3.435 \(\int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3 \, dx\)

Optimal. Leaf size=233 \[ \frac{a^2 \left (-44 c^2 d^2-10 c^3 d+c^4-40 c d^3-12 d^4\right ) \cos (e+f x)}{10 d f}+\frac{a^2 \left (c^2-10 c d-12 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{20 d f}+\frac{a^2 \left (-20 c^2 d+2 c^3-57 c d^2-30 d^3\right ) \sin (e+f x) \cos (e+f x)}{40 f}+\frac{3}{8} a^2 x (2 c+d) \left (2 c^2+3 c d+2 d^2\right )-\frac{a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac{a^2 (c-10 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f} \]

[Out]

(3*a^2*(2*c + d)*(2*c^2 + 3*c*d + 2*d^2)*x)/8 + (a^2*(c^4 - 10*c^3*d - 44*c^2*d^2 - 40*c*d^3 - 12*d^4)*Cos[e +
 f*x])/(10*d*f) + (a^2*(2*c^3 - 20*c^2*d - 57*c*d^2 - 30*d^3)*Cos[e + f*x]*Sin[e + f*x])/(40*f) + (a^2*(c^2 -
10*c*d - 12*d^2)*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(20*d*f) + (a^2*(c - 10*d)*Cos[e + f*x]*(c + d*Sin[e + f
*x])^3)/(20*d*f) - (a^2*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(5*d*f)

________________________________________________________________________________________

Rubi [A]  time = 0.308547, antiderivative size = 233, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.12, Rules used = {2763, 2753, 2734} \[ \frac{a^2 \left (-44 c^2 d^2-10 c^3 d+c^4-40 c d^3-12 d^4\right ) \cos (e+f x)}{10 d f}+\frac{a^2 \left (c^2-10 c d-12 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{20 d f}+\frac{a^2 \left (-20 c^2 d+2 c^3-57 c d^2-30 d^3\right ) \sin (e+f x) \cos (e+f x)}{40 f}+\frac{3}{8} a^2 x (2 c+d) \left (2 c^2+3 c d+2 d^2\right )-\frac{a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac{a^2 (c-10 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^3,x]

[Out]

(3*a^2*(2*c + d)*(2*c^2 + 3*c*d + 2*d^2)*x)/8 + (a^2*(c^4 - 10*c^3*d - 44*c^2*d^2 - 40*c*d^3 - 12*d^4)*Cos[e +
 f*x])/(10*d*f) + (a^2*(2*c^3 - 20*c^2*d - 57*c*d^2 - 30*d^3)*Cos[e + f*x]*Sin[e + f*x])/(40*f) + (a^2*(c^2 -
10*c*d - 12*d^2)*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(20*d*f) + (a^2*(c - 10*d)*Cos[e + f*x]*(c + d*Sin[e + f
*x])^3)/(20*d*f) - (a^2*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(5*d*f)

Rule 2763

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Si
mp[(b^2*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^(n + 1))/(d*f*(m + n)), x] + Dist[1/(d*
(m + n)), Int[(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^n*Simp[a*b*c*(m - 2) + b^2*d*(n + 1) + a^2*d*(
m + n) - b*(b*c*(m - 1) - a*d*(3*m + 2*n - 2))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1] &&  !LtQ[n, -1] && (IntegersQ[2*m, 2*
n] || IntegerQ[m + 1/2] || (IntegerQ[m] && EqQ[c, 0]))

Rule 2753

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(d
*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(f*(m + 1)), x] + Dist[1/(m + 1), Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[
b*d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*
c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]

Rule 2734

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((2*a*c
+ b*d)*x)/2, x] + (-Simp[((b*c + a*d)*Cos[e + f*x])/f, x] - Simp[(b*d*Cos[e + f*x]*Sin[e + f*x])/(2*f), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rubi steps

\begin{align*} \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^3 \, dx &=-\frac{a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac{\int \left (9 a^2 d-a^2 (c-10 d) \sin (e+f x)\right ) (c+d \sin (e+f x))^3 \, dx}{5 d}\\ &=\frac{a^2 (c-10 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac{a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac{\int (c+d \sin (e+f x))^2 \left (3 a^2 d (11 c+10 d)-3 a^2 \left (c^2-10 c d-12 d^2\right ) \sin (e+f x)\right ) \, dx}{20 d}\\ &=\frac{a^2 \left (c^2-10 c d-12 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{20 d f}+\frac{a^2 (c-10 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac{a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac{\int (c+d \sin (e+f x)) \left (3 a^2 d \left (31 c^2+50 c d+24 d^2\right )-3 a^2 \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right ) \sin (e+f x)\right ) \, dx}{60 d}\\ &=\frac{3}{8} a^2 (2 c+d) \left (2 c^2+3 c d+2 d^2\right ) x+\frac{a^2 \left (c^4-10 c^3 d-44 c^2 d^2-40 c d^3-12 d^4\right ) \cos (e+f x)}{10 d f}+\frac{a^2 \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right ) \cos (e+f x) \sin (e+f x)}{40 f}+\frac{a^2 \left (c^2-10 c d-12 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{20 d f}+\frac{a^2 (c-10 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac{a^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}\\ \end{align*}

Mathematica [A]  time = 0.909665, size = 204, normalized size = 0.88 \[ -\frac{a^2 \cos (e+f x) \left (30 \left (8 c^2 d+4 c^3+7 c d^2+2 d^3\right ) \sin ^{-1}\left (\frac{\sqrt{1-\sin (e+f x)}}{\sqrt{2}}\right )+\sqrt{\cos ^2(e+f x)} \left (8 d \left (5 c^2+10 c d+3 d^2\right ) \sin ^2(e+f x)+5 \left (24 c^2 d+4 c^3+21 c d^2+6 d^3\right ) \sin (e+f x)+8 \left (25 c^2 d+10 c^3+20 c d^2+6 d^3\right )+10 d^2 (3 c+2 d) \sin ^3(e+f x)+8 d^3 \sin ^4(e+f x)\right )\right )}{40 f \sqrt{\cos ^2(e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^3,x]

[Out]

-(a^2*Cos[e + f*x]*(30*(4*c^3 + 8*c^2*d + 7*c*d^2 + 2*d^3)*ArcSin[Sqrt[1 - Sin[e + f*x]]/Sqrt[2]] + Sqrt[Cos[e
 + f*x]^2]*(8*(10*c^3 + 25*c^2*d + 20*c*d^2 + 6*d^3) + 5*(4*c^3 + 24*c^2*d + 21*c*d^2 + 6*d^3)*Sin[e + f*x] +
8*d*(5*c^2 + 10*c*d + 3*d^2)*Sin[e + f*x]^2 + 10*d^2*(3*c + 2*d)*Sin[e + f*x]^3 + 8*d^3*Sin[e + f*x]^4)))/(40*
f*Sqrt[Cos[e + f*x]^2])

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 329, normalized size = 1.4 \begin{align*}{\frac{1}{f} \left ({a}^{2}{c}^{3} \left ( -{\frac{\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }{2}}+{\frac{fx}{2}}+{\frac{e}{2}} \right ) -{a}^{2}{c}^{2}d \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) +3\,{a}^{2}c{d}^{2} \left ( -1/4\, \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+3/2\,\sin \left ( fx+e \right ) \right ) \cos \left ( fx+e \right ) +3/8\,fx+3/8\,e \right ) -{\frac{{a}^{2}{d}^{3}\cos \left ( fx+e \right ) }{5} \left ({\frac{8}{3}}+ \left ( \sin \left ( fx+e \right ) \right ) ^{4}+{\frac{4\, \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{3}} \right ) }-2\,{a}^{2}{c}^{3}\cos \left ( fx+e \right ) +6\,{a}^{2}{c}^{2}d \left ( -1/2\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) +1/2\,fx+e/2 \right ) -2\,{a}^{2}c{d}^{2} \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) +2\,{a}^{2}{d}^{3} \left ( -1/4\, \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+3/2\,\sin \left ( fx+e \right ) \right ) \cos \left ( fx+e \right ) +3/8\,fx+3/8\,e \right ) +{a}^{2}{c}^{3} \left ( fx+e \right ) -3\,{a}^{2}{c}^{2}d\cos \left ( fx+e \right ) +3\,{a}^{2}c{d}^{2} \left ( -1/2\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) +1/2\,fx+e/2 \right ) -{\frac{{a}^{2}{d}^{3} \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) }{3}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x)

[Out]

1/f*(a^2*c^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-a^2*c^2*d*(2+sin(f*x+e)^2)*cos(f*x+e)+3*a^2*c*d^2*(-1/
4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/5*a^2*d^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(
f*x+e)-2*a^2*c^3*cos(f*x+e)+6*a^2*c^2*d*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-2*a^2*c*d^2*(2+sin(f*x+e)^2
)*cos(f*x+e)+2*a^2*d^3*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+a^2*c^3*(f*x+e)-3*a^2*c^2
*d*cos(f*x+e)+3*a^2*c*d^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/3*a^2*d^3*(2+sin(f*x+e)^2)*cos(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.17888, size = 429, normalized size = 1.84 \begin{align*} \frac{120 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c^{3} + 480 \,{\left (f x + e\right )} a^{2} c^{3} + 480 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} c^{2} d + 720 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c^{2} d + 960 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} c d^{2} + 45 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c d^{2} + 360 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c d^{2} - 32 \,{\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} a^{2} d^{3} + 160 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} d^{3} + 30 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} d^{3} - 960 \, a^{2} c^{3} \cos \left (f x + e\right ) - 1440 \, a^{2} c^{2} d \cos \left (f x + e\right )}{480 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

1/480*(120*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c^3 + 480*(f*x + e)*a^2*c^3 + 480*(cos(f*x + e)^3 - 3*cos(f*x
+ e))*a^2*c^2*d + 720*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c^2*d + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^2*c
*d^2 + 45*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a^2*c*d^2 + 360*(2*f*x + 2*e - sin(2*f*x + 2
*e))*a^2*c*d^2 - 32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*a^2*d^3 + 160*(cos(f*x + e)^3 - 3
*cos(f*x + e))*a^2*d^3 + 30*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a^2*d^3 - 960*a^2*c^3*cos(
f*x + e) - 1440*a^2*c^2*d*cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.79178, size = 474, normalized size = 2.03 \begin{align*} -\frac{8 \, a^{2} d^{3} \cos \left (f x + e\right )^{5} - 40 \,{\left (a^{2} c^{2} d + 2 \, a^{2} c d^{2} + a^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} - 15 \,{\left (4 \, a^{2} c^{3} + 8 \, a^{2} c^{2} d + 7 \, a^{2} c d^{2} + 2 \, a^{2} d^{3}\right )} f x + 80 \,{\left (a^{2} c^{3} + 3 \, a^{2} c^{2} d + 3 \, a^{2} c d^{2} + a^{2} d^{3}\right )} \cos \left (f x + e\right ) - 5 \,{\left (2 \,{\left (3 \, a^{2} c d^{2} + 2 \, a^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} -{\left (4 \, a^{2} c^{3} + 24 \, a^{2} c^{2} d + 27 \, a^{2} c d^{2} + 10 \, a^{2} d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{40 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/40*(8*a^2*d^3*cos(f*x + e)^5 - 40*(a^2*c^2*d + 2*a^2*c*d^2 + a^2*d^3)*cos(f*x + e)^3 - 15*(4*a^2*c^3 + 8*a^
2*c^2*d + 7*a^2*c*d^2 + 2*a^2*d^3)*f*x + 80*(a^2*c^3 + 3*a^2*c^2*d + 3*a^2*c*d^2 + a^2*d^3)*cos(f*x + e) - 5*(
2*(3*a^2*c*d^2 + 2*a^2*d^3)*cos(f*x + e)^3 - (4*a^2*c^3 + 24*a^2*c^2*d + 27*a^2*c*d^2 + 10*a^2*d^3)*cos(f*x +
e))*sin(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 4.25343, size = 729, normalized size = 3.13 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**2*(c+d*sin(f*x+e))**3,x)

[Out]

Piecewise((a**2*c**3*x*sin(e + f*x)**2/2 + a**2*c**3*x*cos(e + f*x)**2/2 + a**2*c**3*x - a**2*c**3*sin(e + f*x
)*cos(e + f*x)/(2*f) - 2*a**2*c**3*cos(e + f*x)/f + 3*a**2*c**2*d*x*sin(e + f*x)**2 + 3*a**2*c**2*d*x*cos(e +
f*x)**2 - 3*a**2*c**2*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*a**2*c**2*d*sin(e + f*x)*cos(e + f*x)/f - 2*a**2*c*
*2*d*cos(e + f*x)**3/f - 3*a**2*c**2*d*cos(e + f*x)/f + 9*a**2*c*d**2*x*sin(e + f*x)**4/8 + 9*a**2*c*d**2*x*si
n(e + f*x)**2*cos(e + f*x)**2/4 + 3*a**2*c*d**2*x*sin(e + f*x)**2/2 + 9*a**2*c*d**2*x*cos(e + f*x)**4/8 + 3*a*
*2*c*d**2*x*cos(e + f*x)**2/2 - 15*a**2*c*d**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 6*a**2*c*d**2*sin(e + f*x)
**2*cos(e + f*x)/f - 9*a**2*c*d**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 3*a**2*c*d**2*sin(e + f*x)*cos(e + f*x
)/(2*f) - 4*a**2*c*d**2*cos(e + f*x)**3/f + 3*a**2*d**3*x*sin(e + f*x)**4/4 + 3*a**2*d**3*x*sin(e + f*x)**2*co
s(e + f*x)**2/2 + 3*a**2*d**3*x*cos(e + f*x)**4/4 - a**2*d**3*sin(e + f*x)**4*cos(e + f*x)/f - 5*a**2*d**3*sin
(e + f*x)**3*cos(e + f*x)/(4*f) - 4*a**2*d**3*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) - a**2*d**3*sin(e + f*x)**
2*cos(e + f*x)/f - 3*a**2*d**3*sin(e + f*x)*cos(e + f*x)**3/(4*f) - 8*a**2*d**3*cos(e + f*x)**5/(15*f) - 2*a**
2*d**3*cos(e + f*x)**3/(3*f), Ne(f, 0)), (x*(c + d*sin(e))**3*(a*sin(e) + a)**2, True))

________________________________________________________________________________________

Giac [A]  time = 1.38968, size = 437, normalized size = 1.88 \begin{align*} -\frac{a^{2} d^{3} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac{a^{2} d^{3} \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} - \frac{3 \, a^{2} c d^{2} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} + \frac{1}{8} \,{\left (4 \, a^{2} c^{3} + 24 \, a^{2} c^{2} d + 9 \, a^{2} c d^{2} + 6 \, a^{2} d^{3}\right )} x + \frac{1}{2} \,{\left (2 \, a^{2} c^{3} + 3 \, a^{2} c d^{2}\right )} x + \frac{{\left (12 \, a^{2} c^{2} d + 24 \, a^{2} c d^{2} + 5 \, a^{2} d^{3}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac{{\left (16 \, a^{2} c^{3} + 18 \, a^{2} c^{2} d + 36 \, a^{2} c d^{2} + 5 \, a^{2} d^{3}\right )} \cos \left (f x + e\right )}{8 \, f} - \frac{3 \,{\left (4 \, a^{2} c^{2} d + a^{2} d^{3}\right )} \cos \left (f x + e\right )}{4 \, f} + \frac{{\left (3 \, a^{2} c d^{2} + 2 \, a^{2} d^{3}\right )} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac{{\left (a^{2} c^{3} + 6 \, a^{2} c^{2} d + 3 \, a^{2} c d^{2} + 2 \, a^{2} d^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x, algorithm="giac")

[Out]

-1/80*a^2*d^3*cos(5*f*x + 5*e)/f + 1/12*a^2*d^3*cos(3*f*x + 3*e)/f - 3/4*a^2*c*d^2*sin(2*f*x + 2*e)/f + 1/8*(4
*a^2*c^3 + 24*a^2*c^2*d + 9*a^2*c*d^2 + 6*a^2*d^3)*x + 1/2*(2*a^2*c^3 + 3*a^2*c*d^2)*x + 1/48*(12*a^2*c^2*d +
24*a^2*c*d^2 + 5*a^2*d^3)*cos(3*f*x + 3*e)/f - 1/8*(16*a^2*c^3 + 18*a^2*c^2*d + 36*a^2*c*d^2 + 5*a^2*d^3)*cos(
f*x + e)/f - 3/4*(4*a^2*c^2*d + a^2*d^3)*cos(f*x + e)/f + 1/32*(3*a^2*c*d^2 + 2*a^2*d^3)*sin(4*f*x + 4*e)/f -
1/4*(a^2*c^3 + 6*a^2*c^2*d + 3*a^2*c*d^2 + 2*a^2*d^3)*sin(2*f*x + 2*e)/f